Skip to content

Instantly share code, notes, and snippets.

@politza
politza / scroll-other-window.el
Created July 3, 2016 08:22
scroll-other-window.el
;;; sow.el --- Variable commands for scrolling the other window.
;; Copyright (C) 2016 Andreas Politz
;; Author: Andreas Politz <politza@fh-trier.de>
;; Keywords: extensions, frames
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
@mael
mael / tricks.md
Last active May 12, 2024 13:59
Xcode 10.2 "Unable to boot the Simulator"

Solution "Unable to boot the Simulator"

sudo mkdir /private/tmp

sudo chmod 1777 /private/tmp

Other basic command

xcrun

xcrun simctl list devices //to list all simulators

xcrun simctl delete // to delete specific device

using System;
using System.Collections.Generic;
/// <summary>
/// Représente les coordonnées d'une cellule dans une grille.
/// </summary>
public class CellCoordinates
{
public int X { get; set; }
public int Y { get; set; }
@jjsquady
jjsquady / nextjs-deploy.md
Last active May 12, 2024 13:54
Deploying NEXTJS site with nginx + pm2

How to setup next.js app on nginx with letsencrypt

next.js, nginx, reverse-proxy, ssl

1. Install nginx and letsencrypt

$ sudo apt-get update
$ sudo apt-get install nginx letsencrypt

Also enable nginx in ufw

@sekcompsci
sekcompsci / Comparison Espressif ESP MCUs.md
Created June 18, 2021 03:56 — forked from fabianoriccardi/Comparison Espressif ESP MCUs.md
Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

A minimal table to compare the Espressif's MCU families.

ESP8266 ESP32 ESP32-S2 ESP32-S3 ESP32-C3 ESP32-C6
Announcement Date 2014, August 2016, September 2019, September 2020, December
@gabe565
gabe565 / change-arc-icon.md
Last active May 12, 2024 13:52
Change Arc Browser Icon

Change Arc Browser Icon

arc

A collection of commands that change the Arc Browser icon on macOS.

Commands

Theme Command
Candy Arc defaults write company.thebrowser.Browser currentAppIconName candy
@josemmo
josemmo / repair-mysql-data.ps1
Created August 28, 2020 18:48
Repair MySQL data directory (for XAMPP)
# Based on this answer: https://stackoverflow.com/a/61859561/1956278
# Backup old data
Rename-Item -Path "./data" -NewName "./data_old"
# Create new data directory
Copy-Item -Path "./backup" -Destination "./data" -Recurse
Remove-Item "./data/test" -Recurse
$dbPaths = Get-ChildItem -Path "./data_old" -Exclude ('mysql', 'performance_schema', 'phpmyadmin') -Recurse -Directory
Copy-Item -Path $dbPaths.FullName -Destination "./data" -Recurse
@Paraphraser
Paraphraser / Checking your Raspberry Pi's view of its power supply.md
Created June 13, 2022 06:53
Checking your Raspberry Pi's view of its power supply (sometimes it's not the wall-wart)

Checking your Raspberry Pi's view of its power supply

Sometimes it seems like the first (and sometimes only) advice you get offered for almost any problem with a Raspberry Pi is "check your power supply". You think something like:

"hey, I'm using an official power supply sold as being matched with my Pi so how can there be any problem?"

You look up the specs then stick a controlled load across your supply and confirm that it can deliver the required number of Watts.

Yet your problems persist…

@fnky
fnky / ANSI.md
Last active May 12, 2024 13:47
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27

Direct copy of pre-encoded file:

$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8